package com.example._2025_03_30;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/calculate")
public class CalculateController {
    @RequestMapping("/sum")
    public String sum(Integer num1, Integer num2) {
//        省略参数校验
        int sum = num1 + num2;
        return "计算结果: " + sum;
    }
}
